.class public Lcom/instagram/android/fragment/SimpleWebViewFragment;
.super Lcom/instagram/e/b/b;
.source "SimpleWebViewFragment.java"

# interfaces
.implements Lcom/instagram/a/b;


# instance fields
.field private a:Landroid/webkit/WebView;

.field private b:Landroid/content/BroadcastReceiver;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 51
    invoke-direct {p0}, Lcom/instagram/e/b/b;-><init>()V

    .line 41
    new-instance v0, Lcom/instagram/android/fragment/gf;

    invoke-direct {v0, p0}, Lcom/instagram/android/fragment/gf;-><init>(Lcom/instagram/android/fragment/SimpleWebViewFragment;)V

    iput-object v0, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->b:Landroid/content/BroadcastReceiver;

    .line 52
    return-void
.end method

.method private Y()Z
    .locals 2

    .prologue
    .line 190
    invoke-virtual {p0}, Lcom/instagram/android/fragment/SimpleWebViewFragment;->i()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "SimpleWebViewFragment.ARGUMENT_SHOW_REFRESH"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method static synthetic a(Lcom/instagram/android/fragment/SimpleWebViewFragment;)Z
    .locals 1
    .parameter

    .prologue
    .line 30
    invoke-direct {p0}, Lcom/instagram/android/fragment/SimpleWebViewFragment;->Y()Z

    move-result v0

    return v0
.end method


# virtual methods
.method public X()V
    .locals 1

    .prologue
    .line 172
    iget-object v0, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    if-eqz v0, :cond_0

    .line 173
    iget-object v0, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->reload()V

    .line 175
    :cond_0
    return-void
.end method

.method public a(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 149
    iget-object v0, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    return-object v0
.end method

.method public a()Lcom/instagram/a/a;
    .locals 1

    .prologue
    .line 195
    new-instance v0, Lcom/instagram/android/fragment/gh;

    invoke-direct {v0, p0}, Lcom/instagram/android/fragment/gh;-><init>(Lcom/instagram/android/fragment/SimpleWebViewFragment;)V

    return-object v0
.end method

.method public a(Landroid/os/Bundle;)V
    .locals 4
    .parameter

    .prologue
    .line 56
    invoke-super {p0, p1}, Lcom/instagram/e/b/b;->a(Landroid/os/Bundle;)V

    .line 58
    invoke-virtual {p0}, Lcom/instagram/android/fragment/SimpleWebViewFragment;->i()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "SimpleWebViewFragment.ARGUMENT_URL"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 59
    const/4 v0, 0x0

    .line 60
    invoke-virtual {p0}, Lcom/instagram/android/fragment/SimpleWebViewFragment;->i()Landroid/os/Bundle;

    move-result-object v2

    const-string v3, "SimpleWebViewFragment.ARGUMENT_LOAD_SAME_HOST"

    invoke-virtual {v2, v3}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 61
    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    invoke-virtual {v0}, Landroid/net/Uri;->getHost()Ljava/lang/String;

    move-result-object v0

    .line 64
    :cond_0
    new-instance v2, Landroid/webkit/WebView;

    invoke-virtual {p0}, Lcom/instagram/android/fragment/SimpleWebViewFragment;->j()Landroid/support/v4/app/j;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/webkit/WebView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    .line 65
    iget-object v2, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/webkit/WebView;->setScrollBarStyle(I)V

    .line 67
    iget-object v2, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v2

    .line 68
    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    .line 70
    invoke-static {v1}, Lcom/instagram/android/f/a;->a(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_1

    .line 71
    invoke-static {}, Lcom/instagram/android/d/h/a;->a()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/webkit/WebSettings;->setUserAgentString(Ljava/lang/String;)V

    .line 76
    :cond_1
    iget-object v2, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    new-instance v3, Lcom/instagram/android/fragment/gg;

    invoke-direct {v3, p0, v0}, Lcom/instagram/android/fragment/gg;-><init>(Lcom/instagram/android/fragment/SimpleWebViewFragment;Ljava/lang/String;)V

    invoke-virtual {v2, v3}, Landroid/webkit/WebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 140
    iget-object v0, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    .line 141
    return-void
.end method

.method public d_()Ljava/lang/String;
    .locals 1

    .prologue
    .line 225
    const-string v0, "web_view"

    return-object v0
.end method

.method public w()V
    .locals 4

    .prologue
    .line 166
    invoke-super {p0}, Lcom/instagram/e/b/b;->w()V

    .line 167
    invoke-virtual {p0}, Lcom/instagram/android/fragment/SimpleWebViewFragment;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-static {v0}, Landroid/support/v4/a/e;->a(Landroid/content/Context;)Landroid/support/v4/a/e;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->b:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "ActionBarService.action_bar_refresh_click"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/support/v4/a/e;->a(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)V

    .line 169
    return-void
.end method

.method public x()V
    .locals 2

    .prologue
    .line 157
    invoke-super {p0}, Lcom/instagram/e/b/b;->x()V

    .line 158
    invoke-virtual {p0}, Lcom/instagram/android/fragment/SimpleWebViewFragment;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-static {v0}, Landroid/support/v4/a/e;->a(Landroid/content/Context;)Landroid/support/v4/a/e;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->b:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/support/v4/a/e;->a(Landroid/content/BroadcastReceiver;)V

    .line 159
    return-void
.end method

.method public y()V
    .locals 1

    .prologue
    .line 182
    iget-object v0, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    if-eqz v0, :cond_0

    .line 183
    iget-object v0, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->destroy()V

    .line 184
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/instagram/android/fragment/SimpleWebViewFragment;->a:Landroid/webkit/WebView;

    .line 186
    :cond_0
    invoke-super {p0}, Lcom/instagram/e/b/b;->y()V

    .line 187
    return-void
.end method
